<template>
	<view class="page">
		<view>
			<u-navbar  :autoBack="true" bgColor="#252928" safeAreaInsetTop placeholder="true">
				<view style="display: flex;" class="u-nav-slot" slot="left">
					<u-icon color="#ffffff" name="arrow-left" size="19"></u-icon>
					<view style="font-size: 36rpx;margin-left: 20rpx;">设置</view>
					
				</view>
			</u-navbar>
		</view>
		<template v-if="show">
			<view class="realname">
				<view class="t">
					填写实名认证信息
				</view>
				<view class="c">
					填写的实名信息必须与登录手机号持有人相符。当前登陆手机号：{{info.phone|formatNum}}
			
				</view>
				<view class="" style="margin-top: 80rpx;">
			
					<u--input  placeholderStyle="color: #6f6f6f;" placeholder="请输入姓名" border="bottom" :v-model="name"
						 color="#ffffff"></u--input>
					<view class="" >
						<u--input placeholderStyle="color: #6f6f6f;" placeholder="请输入身份证号" border="bottom" :v-model="SFZ"
							type="idcard"  color="#ffffff"></u--input>
					</view>
			
				</view>
				<view class="b">
			<u--text prefixIcon="https://img.xieling.top/gg.png" iconStyle="font-size: 19px;padding-right:10px;"  color="#6f6f6f" text="信息安全保障中,信息用于身份确认"></u--text>
				</view>
				<view class="ingo-cell" style="height: 80rpx;">
			
					<view @click="quit" style="font-weight: 600;  line-height: 80rpx;text-align: center;">
						人脸识别认证
					</view>
			
				</view>
				
				
			</view>
		</template>
		<template v-if="!show">
			<view class="img" >
				<u-icon  name="https://img.xieling.top/realgg.png"  size="60"></u-icon>
				<view class="" style="margin-top: 20rpx; font-size: 48rpx;">
					已实名认证
				</view>
				
			</view>
			<view class="info" >
				<image src="https://img.xieling.top/bg.png" mode=""></image>
				<view class="info-info">
					<view class="info-top">
						<text>姓名</text><br>
						{{info.testname}}
					</view>
					<view class="info-bottom">
						<text>身份证号</text>
						<br>
						{{info.testsfz}}
					</view>
				</view>
				
			</view>
		</template>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					phone: "12345678910",
					testname:"**强",
					testsfz:" 1************************1"
					
				},
				name: '',
				SFZ: '',
				show:1
			}
		},
		filters:{
			formatNum(num) {
				// 手机
				return num.replace(/^(\d{3})\d{6}(\d+)/, "$1******$2")
			},
			
		},
		
		methods: {
quit(){
	this.show = 0
}
		}
	}
</script>

<style lang="scss">
	.realname {
		width: 85%;
		
		margin: 100rpx auto 0rpx;
	
	.t {
			color: #FFFFFF;
			font-size: 48rpx;

		}

		.c {
			margin-top: 20rpx;
			color: #6f6f6f;
		}

		.b {
			display: flex;
			justify-content: center;
			margin-top: 80rpx;
		}

		.u-demo {
			display: flex;
			justify-content: center;
			margin-top: 100rpx;
		}

		.ingo-cell {
			height: 100rpx;
			color: #252928;
			background-color: #736c5c;
			border-radius: 50rpx;
			width: 80%;
			margin: 0px auto;
			margin-top: 100rpx;

		}
	}
	.img{
		display: flex;
		
		flex-direction: column;
		align-items: center;
		margin-top: 150rpx;
		}
		.info{
			position: relative;
			width: 95%;
			margin:0rpx auto ;
			margin-top: 40rpx;
			color: #4c412f;
			font-size: 34rpx;
			font-weight: 500;
			image{
				width: 100%;
			}
			.info-info{
				position: absolute;
				top: 40px;
				left: 20px;
				.info-top{
					margin-bottom: 40rpx;
					text{
						font-size: 24rpx;
					}
					
				}
				.info-bottom{
					
					text{
						font-size: 24rpx;
					}
					
				}
			}
			
		}
</style>
